using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Subtypes
{
    /// <summary>
    /// <para>Set Subtype Field</para>
    /// <para>Defines the field in the input table or feature class that stores the subtype codes.</para>
    /// <para>定义输入表或要素类中用于存储子类型代码的字段。</para>
    /// </summary>    
    [DisplayName("Set Subtype Field")]
    public class SetSubtypeField : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SetSubtypeField()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_table">
        /// <para>Input Table</para>
        /// <para>The input table or feature class that contains the field to set as a subtype field.</para>
        /// <para>包含要设置为子类型字段的字段的输入表或要素类。</para>
        /// </param>
        public SetSubtypeField(object _in_table)
        {
            this._in_table = _in_table;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Set Subtype Field";

        public override string CallName => "management.SetSubtypeField";

        public override List<string> AcceptEnvironments => ["autoCommit", "workspace"];

        public override object[] ParameterInfo => [_in_table, _field, _clear_value.GetGPValue(), _out_table];

        /// <summary>
        /// <para>Input Table</para>
        /// <para>The input table or feature class that contains the field to set as a subtype field.</para>
        /// <para>包含要设置为子类型字段的字段的输入表或要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_table { get; set; }


        /// <summary>
        /// <para>Field Name</para>
        /// <para>The integer field that will store the subtype codes.</para>
        /// <para>将存储子类型代码的整数字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _field { get; set; } = null;


        /// <summary>
        /// <para>Clear Value</para>
        /// <para><xdoc>
        ///   <para>Specifies whether to clear the subtype field.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The subtype field will be cleared (set to null).</bullet_item><para/>
        ///     <bullet_item>Unchecked—The subtype field will not be cleared. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否清除子类型字段。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 子类型字段将被清除（设置为 null）。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不会清除子类型字段。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Clear Value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _clear_value_value _clear_value { get; set; } = _clear_value_value._false;

        public enum _clear_value_value
        {
            /// <summary>
            /// <para>CLEAR_SUBTYPE_FIELD</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CLEAR_SUBTYPE_FIELD")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DO_NOT_CLEAR</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_CLEAR")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Updated Input Table</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_table { get; set; }


        public SetSubtypeField SetEnv(int? autoCommit = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, workspace: workspace);
            return this;
        }

    }

}